package com.xtkj.superclub_activity.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xtkj.superclub_activity.dao.IUserTeamDao;
import com.xtkj.superclub_activity.service.IUserTeamService;
import com.xtkj.superclub_entity.entity.tourpal.Team;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserTeamServiceImpl implements IUserTeamService {

    @Autowired
    private IUserTeamDao userTeamDao;

    @Override
    public List<Team> getTeamsByUserId(String userId) {
        QueryWrapper wrapper = new QueryWrapper<>().select("team_id").eq("user_id",userId);

        return userTeamDao.selectList(wrapper);
    }
}
